<!DOCTYPE html>
<html lang="">

<head>
  <meta charset="UTF-8">
  <link rel="icon" href="/favicon.ico">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <!-- 添加网站描述，用于说明网站有海量素材以及生活分享的功能特点 -->
  <meta name="description" content="悦木 - 一个汇聚海量素材的平台，在这里你可以分享生活点滴，也能浏览各种精彩素材，发现生活中的美好与创意。">
  <title>悦木</title>
  <style>
    #app-loading {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      background: #fff;
      z-index: 9999;
    }

    .loading-content {
      text-align: center;
      padding: 24px;
    }

    .loading-logo {
      width: 80px;
      height: 80px;
      margin-bottom: 16px;
      animation: bounce 2s infinite;
    }

    .loading-title {
      font-size: 24px;
      color: #ff8e53;
      margin-bottom: 8px;
      font-weight: 600;
    }

    .loading-subtitle {
      font-size: 14px;
      color: #64748b;
    }

    .loading-spinner {
      width: 40px;
      height: 40px;
      margin: 20px auto;
      border: 3px solid #f3f3f3;
      border-top: 3px solid #ff8e53;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

    @keyframes bounce {

      0%,
      100% {
        transform: translateY(0);
      }

      50% {
        transform: translateY(-10px);
      }
    }

    @keyframes spin {
      0% {
        transform: rotate(0deg);
      }

      100% {
        transform: rotate(360deg);
      }
    }
  </style>
</head>

<body>
  <div id="app-loading">
    <div class="loading-content">
      <h1 class="loading-title">悦木</h1>
      <p class="loading-subtitle">正在加载精彩内容...</p>
      <div class="loading-spinner"></div>
    </div>
  </div>
  <div id="app"></div>
  <script type="module" src="/src/main.ts"></script>
  <script>
    // 当Vue应用加载完成后，移除loading
    window.addEventListener('load', function () {
      const loading = document.getElementById('app-loading');
      if (loading) {
        loading.style.opacity = '0';
        loading.style.transition = 'opacity 0.3s ease';
        setTimeout(() => {
          loading.style.display = 'none';
        }, 300);
      }
    });
  </script>
</body>

</html>